package com.example.myweb.Repository.JpaRepository;

import com.example.myweb.Domain.Entity.Dynamic;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface DynamicRepository extends JpaRepository<Dynamic, Long> {
    @Query("SELECT d FROM Dynamic d WHERE d.content LIKE %:keyword%")
    Page<Dynamic> searchByKeyword(@Param("keyword") String keyword, Pageable pageable);

}